#[derive(Debug, PartialEq, Clone)]
pub enum TokenKind {
   NumberInt(i64),
   NumberFloat(f64),

   // Symbol(String),
   // Keyword(String),
   Identifier(String),

   Plus,
   Minus,
   Asterisk, // *
   Slash,    // /
   Caret,    // ^
   LParen,
   RParen,

   Comma, //,

   If,
   Else,
   True,
   False,

   Eof,
}

#[derive(Debug, Clone, PartialEq)]
pub struct Token {
   pub(crate) kind: TokenKind,
   pub(crate) lexeme: String,
}

impl Token {
   pub fn new(kind: TokenKind, lexeme: &str) -> Self {
      Self {
         kind,
         lexeme: lexeme.to_string(),
      }
   }

   pub fn eof() -> Self {
      Self {
         kind: TokenKind::Eof,
         lexeme: "\0".to_string(),
      }
   }
}
